package de.slothsoft.commons.swing;


public class EnumComboBoxModel<E extends Enum<E>> extends ArrayComboBoxModel<E> {

	private static final long serialVersionUID = 1L;

	public static <F extends Enum<F>> EnumComboBoxModel<F> createInstance(
			Class<F> enumClass) {
		return createInstance(enumClass, false);
	}

	public static <F extends Enum<F>> EnumComboBoxModel<F> createInstance(
			Class<F> enumClass, boolean addNullElement) {
		return new EnumComboBoxModel<F>(enumClass, addNullElement);
	}

	public EnumComboBoxModel(Class<E> enumClass, boolean addNullElement) {
		super(enumClass.getEnumConstants(), addNullElement);
	}

}
